package com.ld.security.auth.common.feign;


import com.ld.security.auth.common.base.po.FunctionPo;
import com.ld.security.auth.common.base.po.LoginPo;
import com.ld.security.auth.common.base.vo.FunctionVo;
import com.ld.security.auth.common.base.vo.TokenVo;
import com.ld.security.auth.common.rpc.po.TokenPo;
import com.ld.security.common.core.base.vo.DataVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value =  "ld-auth-server")
@RequestMapping("/api/authClient")
public interface AuthClientFeign {

    /**
     * 服务注销
     * @return
     */
    @RequestMapping(value="/logout",method = RequestMethod.POST)
    DataVo logout(@RequestBody TokenPo po);



    @RequestMapping(value = "/login",method = RequestMethod.POST)
    DataVo<TokenVo> login(@RequestBody LoginPo po);

    @RequestMapping(value = "/accredit",method = RequestMethod.POST)
    DataVo<TokenVo> accredit(@RequestBody TokenPo po);

    @RequestMapping(value="/hasPermission",method=RequestMethod.POST)
    DataVo<FunctionVo> hasPermission(@RequestBody FunctionPo po);
}
